;›;**********************************›;›; PROGRAM TO WRITE A BOOT FILE›; TO A DISK›;›;**********************************›;›CARD sec›BYTE ARRAY buff(128)›BYTE index››PROC Siov=$E459()[]››BYTE FUNC hi=*(CARD a)›;›;returns the high order byte of a›;›[$86$A0] ;stx $A0 high order byte›[$60] ;retrun››BYTE FUNC lo=*(CARD a)›;›;returns lo byte of a›;›[$85$A0] ;sta $A0 low order byte›[$60] ;return›;›BYTE FUNC sio(BYTE dev,drv,cmd CARD buf,cnt,sec)››BYTE ARRAY dcb=$300 ›CARD ARRAY dcbc=$300›BYTE stat=$303››dcb(0)=dev›dcb(1)=drv›dcb(2)=cmd›IF cmd=$52 OR cmd=$53 THEN› stat=$40›ELSEIF cmd=$57 OR cmd='w THEN› stat=$80›ELSE› stat=0›FI›dcbc(2)=buf›dcbc(4)=cnt›dcbc(5)=sec›Siov()›RETURN(stat)››BYTE FUNC put_dat(BYTE d,a) ››CARD len›BYTE res››res=0›len=128›buff(index)=a›index==+1›IF index=128 THEN› res=sio('1,d,'W,buff,len,sec)› index=0› sec==+1›FI›RETURN(res)››PROC main()››BYTE ARRAY f_name(40)›BYTE drive,res,a,i›CARD sc,len››Close(1)›Put($7D)›PrintE("Enter name of Âïïô Æéìå")›InputS(f_name)›PrintE("Drive number to write ÂÏÏÔ file to")›drive=InputB()›index=0›sec=1›Open(1,f_name,4,0)›i=0›DO› a=GetD(1)› i==+1› UNTIL i=6›OD›DO› a=GetD(1)› IF EOF(1) THEN› EXIT› FI› put_dat(drive,a)›OD›PrintE("Flushing Âõææåòó")›DO› res=put_dat(drive,0)› UNTIL res=1›OD›sc=1›len=128›res=sio('1,drive,'R,buff,len,sc)›buff(1)=lo(sec)›buff(4)=buff(40)›buff(5)=buff(41)›res=sio('1,drive,'W,buff,len,sc)›PrintE("DONE")›RETURN››